<?php

/**
 * WeEngine Api System
 *
 * (c) We7Team 2019 <https://www.w7.cc>
 *
 * This is not a free software
 * Using it under the license terms
 * visited https://www.w7.cc for more details
 */

namespace W7\Sdk\VSCode\Tests;

use W7\Sdk\VSCode\Traits\StorageTrait;

/**
 * create directory
 */
class TestDirectoryCreate extends TestCase {
	use StorageTrait;

	/**
	 * @var string
	 */
	private $route = '';
	/**
	 * @var string
	 */
	private $dirFrom = 'from';

	protected function setUp(): void {
		parent::setUp(); // TODO: Change the autogenerated stub
		$this->route = route('vs.code.create.directory');
	}

	/**
	 * test create directory
	 */
	public function testDirectoryCreate() {
		$this->storageDeleteDir($this->dirFrom);

		$this->postJson($this->route, ['uri' => $this->dirFrom])->assertOk();
		$this->assertTrue($this->storageIsExists($this->dirFrom));
	}
}
